package Array;

import java.util.*;

/**
 * Enjoy programming!!!
 * Time: 2021/10/26 -  20:26
 */
public class ArrayHomeWork01 {
    public static void main(String[] args) {
        int h = 0;

        Scanner in = new Scanner(System.in);
        int[] array = new int[10];
        for (int i = 0; i < 10; i++) {
            array[i] = in.nextInt();
        }
        for (int j = 5; j <= 8; j++) {
            h = h + array[j];
        }
        System.out.println(h);

    }
}



